// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_LOG
// * CreateDate    : 2014-06-05 18:30:15
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:15
// * LastChanger   : 2014-06-05 18:30:15
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstLogEntity : EntityBase
    {
        public MstLogTable TableSchema
        {
            get
            {
                return MstLogTable.Current;
            }
		}
		
		public MstLogEntity()
        {

        }
		
		public MstLogEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.LogId = Convert.ToString(CommonFunctions.ToObject(dr["LOG_ID"]));
			this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
			this.LogTime = Convert.ToDateTime(CommonFunctions.ToObject(dr["LOG_TIME"]));
			this.LogType = Convert.ToString(CommonFunctions.ToObject(dr["LOG_TYPE"]));
			this.LogStatus = Convert.ToString(CommonFunctions.ToObject(dr["LOG_STATUS"]));
			this.Phase = Convert.ToString(CommonFunctions.ToObject(dr["PHASE"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.ExceptionType = Convert.ToString(CommonFunctions.ToObject(dr["EXCEPTION_TYPE"]));
			this.ExceptionMessage = Convert.ToString(CommonFunctions.ToObject(dr["EXCEPTION_MESSAGE"]));
			this.MachineName = Convert.ToString(CommonFunctions.ToObject(dr["MACHINE_NAME"]));
			this.ProcessName = Convert.ToString(CommonFunctions.ToObject(dr["PROCESS_NAME"]));
			this.ThreadName = Convert.ToString(CommonFunctions.ToObject(dr["THREAD_NAME"]));
        }
		
		public MstLogEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.LogId = Convert.ToString(CommonFunctions.ToObject(dr["LOG_ID"]));
			this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
			this.LogTime = Convert.ToDateTime(CommonFunctions.ToObject(dr["LOG_TIME"]));
			this.LogType = Convert.ToString(CommonFunctions.ToObject(dr["LOG_TYPE"]));
			this.LogStatus = Convert.ToString(CommonFunctions.ToObject(dr["LOG_STATUS"]));
			this.Phase = Convert.ToString(CommonFunctions.ToObject(dr["PHASE"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.ExceptionType = Convert.ToString(CommonFunctions.ToObject(dr["EXCEPTION_TYPE"]));
			this.ExceptionMessage = Convert.ToString(CommonFunctions.ToObject(dr["EXCEPTION_MESSAGE"]));
			this.MachineName = Convert.ToString(CommonFunctions.ToObject(dr["MACHINE_NAME"]));
			this.ProcessName = Convert.ToString(CommonFunctions.ToObject(dr["PROCESS_NAME"]));
			this.ThreadName = Convert.ToString(CommonFunctions.ToObject(dr["THREAD_NAME"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstLogTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string LogId
        {
            get { return Convert.ToString(GetData(MstLogTable.C_LOG_ID)); }
            set { SetData(MstLogTable.C_LOG_ID, value); }
        }
		
        [DataMember]
        public string FormName
        {
            get { return Convert.ToString(GetData(MstLogTable.C_FORM_NAME)); }
            set { SetData(MstLogTable.C_FORM_NAME, value); }
        }
		
        [DataMember]
        public DateTime LogTime
        {
            get { return Convert.ToDateTime(GetData(MstLogTable.C_LOG_TIME)); }
            set { SetData(MstLogTable.C_LOG_TIME, value); }
        }
		
        [DataMember]
        public string LogType
        {
            get { return Convert.ToString(GetData(MstLogTable.C_LOG_TYPE)); }
            set { SetData(MstLogTable.C_LOG_TYPE, value); }
        }
		
        [DataMember]
        public string LogStatus
        {
            get { return Convert.ToString(GetData(MstLogTable.C_LOG_STATUS)); }
            set { SetData(MstLogTable.C_LOG_STATUS, value); }
        }
		
        [DataMember]
        public string Phase
        {
            get { return Convert.ToString(GetData(MstLogTable.C_PHASE)); }
            set { SetData(MstLogTable.C_PHASE, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(MstLogTable.C_DESCRIPTION)); }
            set { SetData(MstLogTable.C_DESCRIPTION, value); }
        }
		
        [DataMember]
        public string ExceptionType
        {
            get { return Convert.ToString(GetData(MstLogTable.C_EXCEPTION_TYPE)); }
            set { SetData(MstLogTable.C_EXCEPTION_TYPE, value); }
        }
		
        [DataMember]
        public string ExceptionMessage
        {
            get { return Convert.ToString(GetData(MstLogTable.C_EXCEPTION_MESSAGE)); }
            set { SetData(MstLogTable.C_EXCEPTION_MESSAGE, value); }
        }
		
        [DataMember]
        public string MachineName
        {
            get { return Convert.ToString(GetData(MstLogTable.C_MACHINE_NAME)); }
            set { SetData(MstLogTable.C_MACHINE_NAME, value); }
        }
		
        [DataMember]
        public string ProcessName
        {
            get { return Convert.ToString(GetData(MstLogTable.C_PROCESS_NAME)); }
            set { SetData(MstLogTable.C_PROCESS_NAME, value); }
        }
		
        [DataMember]
        public string ThreadName
        {
            get { return Convert.ToString(GetData(MstLogTable.C_THREAD_NAME)); }
            set { SetData(MstLogTable.C_THREAD_NAME, value); }
        }
		
		#endregion
	}
	
	
}	

